package net.vkits.anjiamiao.domain.repository;

import net.vkits.anjiamiao.domain.model.Contract;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.Optional;

/**
 * Created by ethan-liu on 2016/11/12.
 */
public interface ContractRepository extends PagingAndSortingRepository<Contract, Long> {
    // 使用房东手机号码查询
    Optional<Contract> findByCellphoneAndDeletedFalse(String cellphone);
    // 使用用户手机号码查询
    Optional<Contract> findByUserPhoneAndDeletedFalse(String userPhone);
}
